package com.sjqg.dao;

import java.sql.SQLException;

import org.apache.commons.dbutils.handlers.BeanHandler;

import com.sjqg.model.User;

public class UserDao extends BaseDao{
	
	public User getAll(String id) {
		try {
			String sql = "select id, name, phone, "
					+ "province, city, detailaddress,"
					+ " userid from address where id = ?";
			return queryRunner.query(sql , new BeanHandler<>(User.class), id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
}
